package com.zhiming.item.cotroller;


import com.zhiming.item.pojo.About;
import com.zhiming.item.service.AboutService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 关于我们 Controller
 */


@RestController
@Slf4j
public class AboutController {
    @Autowired
    private AboutService aboutService;


    /**
     * 获取关于我们 信息
     * @return
     */
    @RequestMapping("/aboutInfo")
    public ResponseEntity<List<About>> getAboutInfo(){
        log.info("【获取关于我们 信息");
        List<About> about = aboutService.getAboutInfo();
        return ResponseEntity.ok(about);
    }
}
